from django.contrib import admin

# Register your models here.


from post.models import *

admin.site.site_header="云招聘"#页面中出现的系统名称
admin.site.site_title="云招聘"    #web页面中的title


# model注册
@admin.register(ResumePost)
class ResumePostAdmin(admin.ModelAdmin):
    list_display =['username','sex','age','edu']   #展示
    # 分页显示
    list_per_page = 1
    list_max_show_all = 10
# 搜索
    search_fields = ['username']
#     自定义显示
    fieldsets = (
        ("基本信息",{
            'fields':[('username','sex'),('age','edu'),('mobile','email'),"position"]
        }),
        ('个人简述',{
            'classes':('collapse',"wide"),
            'fields':['exper','description'],
        })
    )

#     岗位
@admin.register(PositionPost)
class PositionPostAdmin(admin.ModelAdmin):
    list_display = ["p_name","p_salary","p_address","p_edu"]
    # 分页显示
    list_per_page = 10
    list_max_show_all = 50